home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Workspace / Locus / Source / Activator.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  100 lines

  1.  
  2. /*
  3.     Copyright 1993  Jeremy Slade.
  4.  
  5.     You are free to use all or any parts of the Locus project
  6.     however you wish, just give credit where credit is due.
  7.     The author (Jeremy Slade) shall not be held responsible
  8.     for any damages that result out of use or misuse of any
  9.     part of this project.
  10.  
  11. */
  12.  
  13. /*
  14.     Project: Locus
  15.  
  16.     File: Activator.h
  17.  
  18.     Description:
  19.  
  20.     The Activator provides a single interface for using the four differert ActivatorBars -- one for each edge of the screen.  This class defines methods for controlling the various attributes of the ActivatorBars, which together act as a single Activator object.  This includes setting which bars are active (visible), the color of the bars, and notifying the delegate when one of the bars is clicked in.
  21.     
  22.     Original Author: Jeremy Slade
  23.  
  24.     Revision History:
  25.         Created
  26.             V.101    JGS    Tue Mar  9 18:44:28 GMT-0700 1993
  27.  
  28. */
  29.  
  30. #ifndef Actvator_h
  31. #define Activator_h
  32.  
  33. #define Activator_VERSION        (101)
  34.  
  35.  
  36. #import <objc/Object.h>
  37. #import <appkit/color.h>
  38.  
  39.  
  40. // Masks for showing which bars
  41. #define ACT_NONE        0
  42. #define ACT_TOP            (1 << 0)
  43. #define ACT_LEFT        (1 << 1)
  44. #define ACT_RIGHT        (1 << 2)
  45. #define ACT_BOTTOM        (1 << 3)
  46.  
  47.  
  48. @interface Activator : Object
  49. {
  50.     int    barMask;
  51.     id    topBar;
  52.     id    leftBar;
  53.     id    bottomBar;
  54.     id    rightBar;
  55.     
  56.     id    delegate;
  57.     
  58.     NXColor    fillColor;
  59.     NXColor    borderColor;
  60. }
  61.  
  62. // Creating, Initializing
  63. + initialize;
  64. - init;
  65. - free;
  66.  
  67. // Setting the delegate
  68. - setDelegate:anObj;
  69. - delegate;
  70.  
  71. // Controlling the bars
  72. - setBar:(int)mask on:(BOOL)flag;
  73. - (int)barMask;
  74. - (BOOL)isBarOn:(int)mask;
  75. - show:sender;
  76. - hide:sender;
  77. - setColor:(NXColor)color;
  78. - (NXColor)color;
  79. - setBorderColor:(NXColor)color;
  80. - (NXColor)borderColor;
  81. - setFloating:(BOOL)flag;
  82. - (BOOL)isFloating;
  83.  
  84. // Activation
  85. - barHit:sender;
  86.  
  87. // Dragging into activator bars
  88. - setDraggingEnabled:(BOOL)flag;
  89.  
  90. @end
  91.  
  92.  
  93. @interface Object ( ActivatorDelegate )
  94. - activatorHit:sender;
  95. @end
  96.  
  97.  
  98. #endif // Activator_h
  99.  
  100.